package org.openzip.openzip.unpacking.view;

import java.util.Collection;
import java.util.zip.ZipEntry;

import org.openzip.jarsfx.unpacking.model.IOpenZipUnpacker;

/**
 * This interface represents the minimum set of methods that a user interface
 * should implement for the unpacking logic. The implementation can be
 * graphical, text, voice, etc...
 * 
 * @author Jakub Závěrka
 */
public interface IUnpackerUI
{
	/**
	 * This will open/show/use an empty user interface. No files are selected in
	 * advance and no folders are pre-selected or opened. The file list is 
	 * empty.<br>
	 * The user interface should use the logic specified to invoke unpacking of 
	 * the archive when user selected all the files she or he wanted.
	 * 
	 * @param logic
	 *           An implementation of <code>IOpenZipUnpacker</code> interface
	 *           that will be used for creating archives.
	 */
	void showGui(IOpenZipUnpacker logic);
	
	/**
	 * This will open/show/use the user interface with specified files
	 * pre-selected. The specified files are pre-selected only, implementations
	 * should not assume that these files are the ony ones to be included in the
	 * resulting archive. They may get de-selected and others may get 
	 * selected.<br>
	 * The user interface should use the logic specified to invoke unpacking of 
	 * the archive, when user selected all the files she or he wanted.
	 * 
	 * @param logic
	 *           An implementation of <code>IOpenZipArchiver</code> interface
	 *           that will be used for creating archives.
	 * @param files
	 *           A collection of files that will get pre-selected in the user
	 *           interface.
	 */
	void showGui(IOpenZipUnpacker logic, Collection<ZipEntry> files);
}
